﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace WLMes.Models
{
    /// <summary>
    /// 请求参数
    /// </summary>
    public class EQUIP_STATUS_request
    {
        /// <summary>
        /// 请求编号
        /// </summary>
        public string RequestCode { get; set; }
        /// <summary>
        /// 产线编号
        /// </summary>
        public string LineCode { get; set; }
        /// <summary>
        /// 工序编号
        /// </summary>
        public string OperationCode { get; set; }
        /// <summary>
        /// 工序短名称
        /// </summary>
        public string OperationShortName { get; set; }
        /// <summary>
        /// 事件码
        /// </summary>
        public ushort EventCode { get; set; }
        /// <summary>
        /// 产线或设备标识
        /// </summary>
        public int LineOrEquipment { get; set; }
        /// <summary>
        /// 请求（操作）时间
        /// </summary>
        public string RequestTime { get; set; }
        /// <summary>
        /// 设备状态数据集合
        /// </summary>
        public List<StatusSets> StatusSets { get; set; } = new List<StatusSets>();

    }
    /// <summary>
    /// 设备状态数据集合
    /// </summary>
    public class StatusSets
    {
        /// <summary>
        /// 设备ID
        /// </summary>
        public string EquipmentID { get; set; }
        /// <summary>
        /// 运行状态
        /// </summary>
        public bool Run { get; set; }
        /// <summary>
        /// 停止状态
        /// </summary>
        public bool Stop { get; set; }
        /// <summary>
        /// 暂停状态
        /// </summary>
        public bool Pause { get; set; }
        /// <summary>
        /// 空闲状态
        /// </summary>
        public bool Standby { get; set; }
        /// <summary>
        /// 设备故障数据集合
        /// </summary>
        public List<AlarmSets> AlarmSets { get; set; } = new List<AlarmSets>();
        /// <summary>
        /// 调机状态
        /// </summary>
        public bool Debug { get; set; }
        /// <summary>
        /// 维修状态
        /// </summary>
        public bool Repair { get; set; }
        /// <summary>
        /// 保养状态
        /// </summary>
        public bool Maintain { get; set; }
        /// <summary>
        /// 自定义运行状态集合
        /// </summary>
        public List<CustomizeRunningStatusSets> CustomizeRunningStatusSets { get; set; } = new List<CustomizeRunningStatusSets>();
        /// <summary>
        /// 产线/设备状态对应的实际采集时间
        /// </summary>
        public string CollectTime { get; set; }
    }

    /// <summary>
    /// 设备故障数据集合
    /// </summary>
    public class AlarmSets
    {
        /// <summary>
        /// 警告状态
        /// </summary>
        public bool Warnning { get; set; }
        /// <summary>
        /// 故障汇总状态
        /// </summary>
        public List<FaultSets> FaultSets { get; set; } = new List<FaultSets>();

    }
    /// <summary>
    /// 故障汇总状态
    /// </summary>
    public class FaultSets
    {
        /// <summary>
        /// 气缸类故障
        /// </summary>
        public bool E01 { get; set; }
        /// <summary>
        /// 传感器类故障
        /// </summary>
        public bool E02 { get; set; }
        /// <summary>
        /// 变频器类故障
        /// </summary>
        public bool E03 { get; set; }
        /// <summary>
        /// 伺服电机类故障
        /// </summary>
        public bool E04 { get; set; }
        /// <summary>
        /// 通讯类故障
        /// </summary>
        public bool E05 { get; set; }
        /// <summary>
        /// 预留
        /// </summary>
        public bool E06 { get; set; }
        /// <summary>
        /// 预留
        /// </summary>
        public bool E07 { get; set; }
        /// <summary>
        /// 预留
        /// </summary>
        public bool E08 { get; set; }
        /// <summary>
        /// 预留
        /// </summary>
        public bool E09 { get; set; }
        /// <summary>
        /// 预留
        /// </summary>
        public bool E10 { get; set; }
        /// <summary>
        /// 预留
        /// </summary>
        public bool E11 { get; set; }
        /// <summary>
        /// 预留
        /// </summary>
        public bool E12 { get; set; }
        /// <summary>
        /// 预留
        /// </summary>
        public bool E13 { get; set; }
        /// <summary>
        /// 预留
        /// </summary>
        public bool E14 { get; set; }
        /// <summary>
        /// 预留
        /// </summary>
        public bool E15 { get; set; }


    }
    /// <summary>
    /// 自定义运行状态集合
    /// </summary>
    public class CustomizeRunningStatusSets
    {
        /// <summary>
        /// 自定义运行状态ID
        /// </summary>
        public string CustomizeRunningStatusID { get; set; }
        /// <summary>
        /// 自定义运行状态名称
        /// </summary>
        public string CustomizeRunningStatusName { get; set; }
        /// <summary>
        /// 自定义运行状态值
        /// </summary>
        public bool CustomizeRunningStatusValue { get; set; }

    }

    /// <summary>
    /// 回传数据
    /// 返回信息
    /// </summary>
    public class EQUIP_STATUS_response
    {
        /// <summary>
        /// 事件码
        /// </summary>
        public ushort EventCode { get; set; }
        /// <summary>
        /// 描述信息
        /// </summary>
        public string EventDescription { get; set; }

    }
}
